package rediect

import (
	"fmt"
	"github.com/gin-gonic/gin"
	"net/http"
)

func RedirectA(ctx *gin.Context) {
	fmt.Println("这是A路由")

	ctx.Redirect(http.StatusFound, "https://www.baidu.com") //路由B
}

func RedirectB(ctx *gin.Context) {
	fmt.Println("这是B路由")

	ctx.String(http.StatusFound, "这是B路由")
	//ctx.Redirect(http.StatusFound, "redirect_A") //路由A
}
